{template 'common/header'}

<div class="clearfix">
<ul class="nav nav-tabs">
	<li><a href="{php echo $this->createWebUrl('byq')}">动态审核</a></li>
	<li class="active"><a href="{php echo $this->createWebUrl('topic')}">话题列表</a></li>
	<li><a href="{php echo $this->createWebUrl('topic_post')}">添加话题</a></li>
	<li><a href="{php echo $this->createWebUrl('byq_set')}">设置</a></li>
</ul>
<!-- <div class="panel panel-default">
	<div class="panel-heading">筛选</div>
	<div class="panel-body">
		<form action="" method="post" class="form-horizontal" role="form" id="form">
			<div class="form-group">
				<label class="col-md-2 control-label">奖品名</label>
				<div class="col-md-5">
					<input type="text" class="form-control" name="keyword" id="keyword" value="{$keyword}">
				</div>
				<div class="pull-right col-md-2">
					<button type="submit" class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
				</div>
			</div>
		</form>
	</div>
</div> -->
<div class="main panel panel-default">
	<div class="table-responsive">
		<table class="table table-hover">
			<thead class="navbar-inner">
				<tr>
					<th style="width:5%;" class="text-center">id</th>
					<th style="width:10%;" class="text-center">话题</th>
					<th style="width:30%;" class="text-center">图片</th>
					<th style="width:20%;" class="text-center">顺序</th>
					<th style="width:10%;" class="text-center">状态</th>				
					<th class="text-right" style="width:15%;" class="text-center">操作</th>
				</tr>
			</thead>
			<tbody>
				{loop $list $index $item}
				<tr>
					<td class="text-center">{$item['id']}</td>
					<td class="text-center">{$item['title']}</td>
					<td class="text-center"><img class="scrollLoading" src="{media $item['toppic']}" data-url="{media $item['toppic']}" onerror="this.src='/web/resource/images/nopic-small.jpg'" height="70" width="200"></td>
					<td class="text-center">{$item['displayorder']}</td>
					<td class="text-center">{if $item['status'] == 1}
							<span class="label label-success">显示</span>
							{else}
							<span class="label label-default">不显示</span>
						{/if}
					</td>
					<td class="text-right">
						<a href="{php echo $this->createWebUrl('topic_post',array('id'=>$item['id']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="" data-original-title="修改"><i class="fa fa-edit"></i></a>
						<a href="{php echo $this->createWebUrl('topic_post',array('act'=>'del','id'=>$item['id']))}" class="btn btn-default btn-sm" data-toggle="tooltip" data-placement="top" title="" data-original-title="删除"><i class="fa fa-times"></i></a>
					</td>
				</tr>
				{/loop}
				{if empty($list) }
                <tr ng-if="!wechats">
                <td colspan="9" class="text-center">暂无数据</td>
                </tr>
                {/if}
                <tr>
					<td colspan="9" style="text-align:right">{$page}</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>
<script>
	require(['bootstrap'],function($){
		$('.btn').hover(function(){
			$(this).tooltip('show');
		},function(){
			$(this).tooltip('hide');
		});
	});
</script>
</div>

{template 'common/footer'}